#保留原函数的元信息
from functools import  wraps

def my_decorator(func):
    def wrapper(*args,**kwargs):
        """wrapper文档"""
        print(func.__name__)
        print(func(*args,**kwargs))
    return wrapper

@my_decorator
def add(a,b):
    """add文档"""
    return a+b

print(add(1,2))
print(add.__name__)
print(add.__doc__)